<template>
	<button v-if="!token" open-type="getPhoneNumber" class="absolute loginButton"
		@getphonenumber="getphonenumber">登录</button>
</template>

<script setup>
	import {
		onMounted,
		ref
	} from "vue"

	const token = ref();

	onMounted(() => {
		token.value = uni.getStorageSync("accessToken")
	})

	function getphonenumber(val) {
		console.log(val)
	}
</script>

<style scoped>
	.loginButton {
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		opacity: .4;
	}
</style>